- var logged = user.logged()

.comments
  - if (!logged)
    .inner-container
      .alert.alert-info.with-icon
        i.alert-icon.glyphicon.glyphicon-comment
        = t('comments.sign-in-required')
        | .&nbsp;
        a(href="/signin")= t('signin.login')
        | &nbsp;#{t('common.or')}&nbsp;
        - var signupUrl = '/signup?reference=' + reference
        a(href=signupUrl)= t('signin.signup')
        | .

  - if (canComment)
    .inner-container.my-comments
      h4=t('comments.your.arguments')
      ul.media-list.my-comments-list
      form.comment-form(method='post', action='/api/topic/#{topic.id}/comment', autovalidate='autovalidate', autosubmit='autosubmit')
        h5= t('comments.your-argument')
          a.pull-right(href='/help/markdown', target='_blank') #{t('markdown.comments.formatting-help')}
        p
          textarea(name='text', rows='4', validate='required max-length:4096', tabindex=1)
          ul.form-messages
        input.btn.form-submit.pull-right(type='submit', tabindex=2, value=t('comments.send'))
        a(href='#', tabindex=3).btn.btn-link.cancel-new-comment.pull-right=t('common.cancel')
        ul.form-messages
      button.btn.btn-block.new-comment.hide
        i.icon-plus
        =t('comments.new.argument')
  .inner-container.all-comments
    h4
      span(comments-count)
      =t('comments.arguments')
    ul.media-list.comments-list
    btn.btn.btn-primary.btn-block.load-comments.hide=t('comments.load-more')
